package hive

import org.apache.spark.sql.SparkSession

object sql {
    def main(args: Array[String]): Unit = {
        val spark = SparkSession.builder()
          .master("local[2]")
          .appName("test01")
          .enableHiveSupport()
          .config("spark.sql.warehouse.dir","hdfs://spark01:9000/warehouse/")
          .getOrCreate()

        spark.sql("use cy_database")
        spark.sql("select * from ads_big_screen_result_gaoxiao").show()



        spark.close()

    }
}
